package com.example.fresh_fruit.mapper;

import com.example.fresh_fruit.dto.DeliveryDto;
import com.example.fresh_fruit.entity.OrderDetails;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author :飞天の鱼
 * @date : 2022/8/18 11:53
 */
@Repository
public interface OrdersDetailsMapper {

    /**
     * @return
     * 查询所有订单详情
     */
    List<OrdersDetailsMapper> select();

    /**
     * @param orderDetails
     * 插入订单详情
     * @return
     */
    int insertOrderDetails(OrderDetails orderDetails);

    /**
     * @param id
     * 根据订单ID进行查询
     * @return
     */
    List<OrderDetails> findByID(Integer id);

    /**
     * @return
     * 确认订单详情，即商品id，用户点击
     */
    int confirmOrders(Integer id);

    int insertDelivery(OrderDetails orderDetails);

}
